// MooTools: the javascript framework.
// Load this file's selection again by visiting: http://mootools.net/more/0735e69ac492ce751e149c3d9cb84705
// Or build this file again with packager using: packager build More/More More/Class.Occlude
/*
---

script: More.js

name: More

description: MooTools More

license: MIT-style license

authors:
  - Guillermo Rauch
  - Thomas Aylott
  - Scott Kyle
  - Arian Stolwijk
  - Tim Wienk
  - Christoph Pojer
  - Aaron Newton
  - Jacob Thornton

requires:
  - Core/MooTools

provides: [MooTools.More]

...
*/

MooTools.More = {
  'version': '1.3.2.1',
  'build': 'e586bcd2496e9b22acfde32e12f84d49ce09e59d'
};


/*
---

script: Class.Occlude.js

name: Class.Occlude

description: Prevents a class from being applied to a DOM element twice.

license: MIT-style license.

authors:
  - Aaron Newton

requires:
  - Core/Class
  - Core/Element
  - /MooTools.More

provides: [Class.Occlude]

...
*/

Class.Occlude = new Class({

  occlude: function(property, element){
    element = document.id(element || this.element);
    var instance = element.retrieve(property || this.property);
    if (instance && !this.occluded)
      return (this.occluded = instance);

    this.occluded = false;
    element.store(property || this.property, this);
    return this.occluded;
  }

});

